# -*- coding: utf-8 -*-
# @Time    : 2022/10/9 20:54
# @Author  : 修远
# @File    : enums.py
# @Comment : 
from enum import Enum


class Gender(Enum):
    '''性别'''
    FEMALE = 0
    MALE = 1

    @classmethod
    def gender_str(cls, status):
        key_map = {
            cls.FEMALE: "女",
            cls.MALE: "男"
        }
        return key_map[status]


class Status(Enum):
    SUCCESS_CODE = 200
    SUCCESS = "SUCCESS"
    FAIL_CODE = 201
    FAIL = "FAIL"
    USER_OR_PASSWORD_NO = "账号不存在或密码错误！"
    TOKEN_OVERDUE = "token已过期"
    LOGIN_SUCCESS = "SUCCESS"
